package hr.ctg.domain.action.park;

import hr.ctg.domain.model.Park;
import hr.ctg.service.dao.ParkDAO;

import org.jboss.seam.annotations.Factory;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.web.RequestParameter;

@Name("parkDetailsAction")
public class ParkDetailsAction {
	@In
	ParkDAO parkDAO;

	@RequestParameter
	private Integer idParka;

	@Factory(value = "parkDetails", autoCreate = true)
	public Park getPark() {
		final Park park = parkDAO.find(idParka);

		return park;
	}
}
